{	Problem: http://codeforces.ru/problemset/problem/69/A
 	Verdict: Accepted
}
var i,n,a,b,c,x,y,z:longint;
begin
read(n);
x:=0;
y:=0;
z:=0;
for i:=1 to n do begin
    read(a,b,c);
    inc(x,a);
    inc(y,b);
    inc(z,c);
end;
if(x=0)and(y=0)and(z=0)then write('YES') else write('NO');
End.